﻿using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace HardcoreGame.Content.Buffs
{
    public class Scalding : ModBuff
    {
        private int timer = 0;
        private const int interval = 60;
        public override void SetStaticDefaults()
        {
            Main.debuff[Type] = true;
            BuffID.Sets.LongerExpertDebuff[Type] = true;
        }
        public override void Update(Player player, ref int buffIndex)
        {
            timer++;
            if (timer >= interval)
            {
                int lifeReduction1 = 1;
                player.statLife -= lifeReduction1;
                if (player.statLife < 0)
                {
                    player.statLife = 0;
                }
                CombatText.NewText(player.getRect(), Color.Red, lifeReduction1, true);
                timer = 0;
            }
        }
    }
}
